<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of signup_model
 *
 * @author suman
 */
class Signup_model extends Model{
    
    public function __construct() {
        parent::__construct();
    }
    public function add($data=array()){
        pr($this, FALSE);
        $sql="INSERT INTO " .$this->db->dbPrefix ."users SET 
            username='".$data['email']."',
            password='".$data['email']."',
            isAdmin='0',
            email='".$data['email']."',
            firstName='".$data['firstName']."',
            lastName='".$data['lastName']."',
            gender='".$data['gender']."',
            address1='".$data['add1']."',
            address2='".$data['add2']."',
            cityId='".$data['city']."',
            stateId='".$data['state']."',
            countryId='".$data['country']."',
            zipcode='".$data['zipcode']."',
            status='1',
            isDeleted='0',
            joinDate=NOW(),
            updateDate=NOW(),
            lastLogin=NOW(),
            activateCode='',
            isOnline='1',
          ";
        echo $sql;
        return $this->db->runQuery($sql);
    }
}

?>
